using System;
using System.Runtime.Serialization;

namespace MiniStock.Entities.Common.Events
{
    [DataContract]
    public class StatusQueryEvent : ProtocolEventBase
    {
        [DataMember]
        public EventProcessingState State { get; set; }

        [DataMember]
        public string EventType { get; set; }
        
        [DataMember]
        public Guid? EntityId { get; set; }

        [DataMember]
        public string EntityHash { get; set; }

        [DataMember]
        public string Message { get; set; }
    }

    [DataContract]
    public enum EventProcessingState
    {
        [EnumMember]
        Unknown,
        [EnumMember]
        Processing,
        [EnumMember]
        Completed,
        [EnumMember]
        Faulted
    }
}
